<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>mission14</title>
</head>
<body>
	<h3>污染城市列表</h3>
	<ul id="api-list">
	</ul>
</body>
<script type="text/javascript">
	var apiDate = [
		["北京",100],
		["上海",200],
		["天津",90],
		["西安",80],
		["成都",30]
	];
	
	(function () {
		// body...
		var contentStr ="";//若不想给变量声明为undefined或null，则声明为空字符串即可
		var chineseNumbers = ["一","二","三","四","五","六","七","八","九","十"];
		apiDate.sort(function (d1,d2) {
			// body...
			return d2[1] - d1[1];
		}).filter(function (element) {
			// 对数组中的每一项运行给定的函数，并返回函数会返回true的所组成的数组
			return element[1] > 60;
		}).forEach(function (element,index) {
			// 对每一项运行函数，没有返回值
			contentStr +="<li>第" + chineseNumbers[index] + "名：" + element[0] + element[1] + "<li>";
		});
		document.getElementById("api-list").innerHTML = contentStr;
	})();
</script>
</html>